<?php
  include("../Includes/FusionCharts_Gen.php");
  include("../Includes/DBConn.php");
?>
<HTML xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en>
	<HEAD>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<title>UPLB DV</title>
		<script language="Javascript" src="../js/FusionCharts.js"></script>
		<link href="../css/960.css" rel="stylesheet" type="text/css" />
		<link href="../css/reset.css" rel="stylesheet" type="text/css" />
		<link href="../css/text.css" rel="stylesheet" type="text/css" />
		<link href="../css/style.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="../js/search.js"></script>

		<script type="text/javascript" src="../js/jquery-1.3.1.min.js"></script>
		<script type="text/javascript" src="../js/slide.js"></script>
		<script type="text/javascript" src="../js/loadgallery.js"></script>
		<link href="../css/slideshow.css" rel="stylesheet" type="text/css" />
		<link href="../css/table.css" rel="stylesheet" type="text/css" />

		<script type="text/javascript">
			/*
			function loadXMLDoc()
			{
			alert("value changed");
			}
			*/
		</script>
	</HEAD>

	<BODY>
	<CENTER>				
			<?php				
				$snfirst = $_POST['sn_first'];
				$snfirst2 = $_POST['sn_first2'];
				$snlast = $_POST['sn_last'];
				$snlast2 = $_POST['sn_last2'];
				$yearfirst = $_POST['year_first'];
				$yearfirst2 = $_POST['year_first2'];
				$yearlast = $_POST['year_last'];
				$yearlast2 = $_POST['year_last2'];
				$semester = $_POST['semester'];
				$semester2 = $_POST['semester2'];
				$kindofgraph = $_POST['kindofgraph'];
			
			
				echo "<form action='v_comparison.php' target='graph' method='post'>";
				echo "<center><table class='parameters' cellspacing='0' width='100%'>";
					echo "<tr>";
						echo "<td class='hed'>Per Student</td>";
					echo "</tr>";
					echo "<tr>";
						echo "<td>Student Number: <input type='text' name='sn_first' size='4' maxlength='4' value='$snfirst'/>-<input type='text' name='sn_last' size='5' maxlength='5' value='$snlast' /><br/>";
						echo "Student Number: <input type='text' name='sn_first2' size='4' maxlength='4' value='$snfirst2'/>-<input type='text' name='sn_last2' size='5' maxlength='5' value='$snlast2' /></td>";
					echo "</tr>";
					echo "<tr>";
						echo "<td class='hed'>Academic Year</td>";
					echo "</tr>";
					echo "<tr>";
						echo "<td>";
						echo "From A.Y.: ";
						echo "<select name='semester'>";
							if($semester=='1'){
								echo "<option value='1' selected='selected'>First</option>";
							}
							else echo "<option value='1'>First</option>";
							
							if($semester=='2'){
								echo "<option value='2' selected='selected'>Second</option>";
							}
							else echo "<option value='2'>Second</option>";
							if($semester=='3'){
								echo "<option value='3' selected='selected'>Summer</option>";
							}
							else echo "<option value='3'>Summer</option>";
						echo "</select>";
						echo "<input type='text' name='year_first' size='4' maxlength='4' value='$yearfirst' />-<input type='text' name='year_last' size='4' maxlength='4' value='$yearlast' />";
						echo "<br/>";
						echo " to A.Y.: ";
						echo "<select name='semester2'>";
							if($semester2=='1'){
								echo "<option value='1' selected='selected'>First</option>";
							}
							else echo "<option value='1'>First</option>";
							
							if($semester2=='2'){
								echo "<option value='2' selected='selected'>Second</option>";
							}
							else echo "<option value='2'>Second</option>";
							if($semester2=='3'){
								echo "<option value='3' selected='selected'>Summer</option>";
							}
							else echo "<option value='3'>Summer</option>";
						echo "</select>";
						echo " <input type='text' name='year_first2' size='4' maxlength='4' value='$yearfirst2' />-<input type='text' name='year_last2' size='4' maxlength='4' value='$yearlast2' />";
						echo "</td>";
					echo "</tr>";
					echo "<tr>";
						echo "<td class='hed'>Select Graph</td>";
					echo "</tr>";
					echo "<tr>";
						echo "<td>";
							echo "<select name='kindofgraph'>";
								echo "<optgroup label='Single Semester'>";
									if($kindofgraph == 'FCF_COLUMN2D'){
										echo "<option value='FCF_COLUMN2D' selected='selected'>Vertical Bar Graph</option>";
									}
									else echo "<option value='FCF_COLUMN2D'>Vertical Bar Graph</option>";
									if($kindofgraph == 'FCF_BAR2D'){
										echo "<option value='FCF_BAR2D' selected='selected'>Horizontal Bar Graph</option>";
									}
									else echo "<option value='FCF_BAR2D'>Horizontal Bar Graph</option>";
									if($kindofgraph == 'FCF_LINE'){
										 echo "<option value='FCF_LINE' selected='selected'>Line Graph</option>";
									}
									else echo "<option value='FCF_LINE'>Line Graph</option>";
								echo "</optgroup>";
						
								echo "<optgroup label='Multiple Semester'>";
									if($kindofgraph == 'FCF_MSCOLUMN2D'){
										echo "<option value='FCF_MSCOLUMN2D' selected='selected'>Vertical Bar Graph</option>";
									}
									else echo "<option value='FCF_MSCOLUMN2D'>Vertical Bar Graph</option>";
									if($kindofgraph == 'FCF_MSBAR2D'){
										echo "<option value='FCF_MSBAR2D' selected='selected'>Horizontal Bar Graph</option>";
									}
									else echo "<option value='FCF_MSBAR2D'>Horizontal Bar Graph</option>";
									if($kindofgraph == 'FCF_MSLINE'){
										 echo "<option value='FCF_MSLINE' selected='selected'>Line Graph</option>";
									}
									else echo "<option value='FCF_MSLINE'>Line Graph</option>";
									if($kindofgraph == 'FCF_CANDLESTICK'){
										echo "<option value='FCF_CANDLESTICK' selected='selected'>Candlestick</option>";
									}
									else echo "<option value='FCF_CANDLESTICK'>Candlestick</option>";
								echo "</optgroup>";
							
								echo "<optgroup label='Grade Distribution'>";
									if($kindofgraph == 'FCF_PIE3D'){
										echo "<option value='FCF_PIE3D' selected='selected'>Pie Graph</option>";
									}
									else echo "<option value='FCF_PIE3D'>Pie Graph</option>";
									if($kindofgraph == 'FCF_DOUGHNUT2D'){
										echo "<option value='FCF_DOUGHNUT2D' selected='selected'>Doughnut Graph</option>";
									}
									else echo "<option value='FCF_DOUGHNUT2D'>Doughnut Graph</option>";
									if($kindofgraph == 'FCF_FUNNEL'){
										 echo "<option value='FCF_FUNNEL' selected='selected'>Funnel Graph</option>";
									}
									else echo "<option value='FCF_FUNNEL'>Funnel Graph</option>";
									echo "</optgroup>";
									
									echo "<optgroup label='GWA'>";
									if($kindofgraph == 'FCF_LINE3'){
										echo "<option value='FCF_LINE3' selected='selected'>Line Graph</option>";
									}
									else echo "<option value='FCF_LINE3'>Line Graph</option>";
								echo "</optgroup>";
							echo "</select>";
						echo "</td>";
					echo "</tr>";
					echo "<tr>";
						echo "<td><center><input type='submit' value='Generate Graph'/></center></td>";
					echo "</tr>";
				echo "</table></center>";
				echo "</form>";
			?>
	</CENTER>
	</BODY>
</HTML>